package com.thb.pay.api.agent;

import com.thb.pay.core.utils.PageResult;
import com.thb.pay.vo.req.AgentAccountPageReq;
import com.thb.pay.vo.resp.AgentAccountVo;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@Slf4j
@Component
public class AgentAccountServiceApiFallbackFactory implements FallbackFactory<AgentAccountServiceApi> {


    @Override
    public AgentAccountServiceApi create(Throwable throwable) {
        return new AgentAccountServiceApi() {

            @Override
            public PageResult<AgentAccountVo> findPage(@RequestBody AgentAccountPageReq pageReq) {
                return null;
            }

            @Override
            public AgentAccountVo getById(@RequestParam("agentId") Long agentId) {
                return null;
            }

            @Override
            public void increaseAmountToAccount(@RequestParam("agentId") Long agentId, @RequestParam("amount") Long amount, @RequestParam("bizType") Integer bizType, @RequestParam("bizItem") String bizItem, @RequestParam("orderId") String orderId) {

            }

            @Override
            public void decreaseAmountToAccount(@RequestParam("agentId") Long agentId, @RequestParam("amount") Long amount, @RequestParam("bizType") Integer bizType, @RequestParam("bizItem") String bizItem) {

            }

            @Override
            public void freezeAmountToAccount(@RequestParam("agentId") Long agentId, @RequestParam("freezeAmount") Long freezeAmount) {

            }

            @Override
            public void unFreezeAmountToAccount(@RequestParam("agentId") Long agentId, @RequestParam("unfreezeAmount") Long unfreezeAmount, @RequestParam("requestNo") String requestNo, @RequestParam("bizType") Integer bizType) {

            }

            @Override
            public void unFreezeSettAmountToAccount(@RequestParam("agentId") Long agentId, @RequestParam("unfreezeAmount") Long unfreezeAmount) {

            }
        };
    }
}